package com.elh.jvm.classpath;

/**
 * @author liulei
 **/
public abstract class AbstractEntry implements Entry{

     Entry create(String path){
        if (isJar(path)) {
            return new ZipEntry(path);
        }
        return new DictEntry(path);
    }


    public static boolean isJar(String path){
         return path.endsWith(".jar") || path.endsWith(".JAR") ||
                 path.endsWith(".zip") || path.endsWith(".ZIP");
    }

}
